///引入共享头部
import '../../../common/shard.dart';

class CacheImagePage extends StatelessWidget {
	const CacheImagePage({Key? key}) : super(key: key);

	@override
	Widget build(BuildContext context) {
		return CustomCupertinoScaffold(
			titleText: "图片加载与缓存",
			navBackgroundColor: Theme.of(context).primaryColor,
			body: Column(
				children: const [
					SizedBox(height:100),
					Text("正常图片"),
					SizedBox(
						child: CacheImage(url: "http://c-ssl.duitang.com/uploads/item/201808/21/20180821223915_yyrpi.thumb.400_0.jpg"),
						width: 200,
						height: 200,
					),
					SizedBox(height:100),
					Text("错误图片"),
					SizedBox(
						child: CacheImage(url: "http://c-ssl.duitang.com/uploads/item/201808/21/20180821223916_yyrpi.thumb.400_0.jpg"),
						width: 200,
						height: 200,
					)
				],
			),
		);
	}
}
